﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ApprovalFlow.Models
{
    public class WaitForStepDescription : StepDescription
    {
        public override IEnumerable<ExecutionPointer> Builder(WorkflowInstance instance, ExecutionPointer master)
        {
            ExecutionPointer pointer = new ExecutionPointer
            {
                Id = this.Id,
                PredecessorId = master?.Id,
                InstanceId = instance.InstanceId,
                StepName = this.Name,
                Processor = "waitFor"
            };
            yield return pointer;
        }
    }
}
